﻿using System;
using CoreRay;
using CoreRay.Testing.MockClasses;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CoreRay.Testing
{
    //-----------------------------------------------------------------------------------------
    /// <summary>
    /// This is a test class for FilterTest and is intended
    /// to contain all FilterTest Unit Tests
    /// </summary>
    //-----------------------------------------------------------------------------------------
    [TestClass]
    public class FilterTest
    {
        //-----------------------------------------------------------------------------------------
        /// <summary>
        /// A test for <see cref="Filter"/> constructor.
        /// </summary>
        //-----------------------------------------------------------------------------------------
        [TestMethod]
        public void FilterConstructorTest()
        {
            float width = 586;
            float height = 325;

            Filter target = new MockFilter(width, height);

            Assert.IsTrue(target.Width == width && target.Height == height);
        }


        //-----------------------------------------------------------------------------------------
        /// <summary>
        /// A test for <see cref="Filter"/> constructor width negative width.
        /// </summary>
        //-----------------------------------------------------------------------------------------
        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void FilterConstructorNegativeWidthTest()
        {
            float width = -586;
            float height = 325;

            Filter target = new MockFilter(width, height);
        }


        //-----------------------------------------------------------------------------------------
        /// <summary>
        /// A test for <see cref="Filter"/> constructor width negative height.
        /// </summary>
        //-----------------------------------------------------------------------------------------
        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void FilterConstructorNegativeHeightTest()
        {
            int width = 586;
            int height = -325;

            Filter target = new MockFilter(width, height);
        }
    }
}
